package com.yegs.jltqc.dao;

import com.yegs.jltqc.VO.QcProduce;
import com.yegs.jltqc.VO.RpAge;
import com.yegs.jltqc.VO.RpProduce;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageRequest;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.domain.Specification;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

@Repository
public interface RpProduceRepository extends JpaRepository<RpProduce,Long> {

    RpProduce findFirstByIdIsAfter(Long id);

    RpProduce findFirstByIdBeforeOrderByIdDesc(Long id);

    RpProduce findFirstByOrderById();

    RpProduce findFirstByOrderByIdDesc();

    RpProduce findFirstByModidOrderByIdDesc(Long modid);

    Page<RpProduce> findRpProducesByCreateByEquals(String createBy, Specification<RpProduce> specification, Pageable pageable);

    Page<RpProduce> findAll(Specification<RpProduce> specification, Pageable pageable);
}
